www.gusucode.com > VC++ 自制SQL数据库,含有服务端+客户端-源码程序 > VC++ 自制SQL数据库,含有服务端+客户端-源码程序/code/Client/Msg.cpp
//Download by http://www.NewXing.com // Msg.cpp : implementation file // #include "stdafx.h" #include "Client.h" #include "Msg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMsg IMPLEMENT_DYNCREATE(CMsg, CObject) CMsg::CMsg() { Init(); } CMsg::~CMsg() { } ///////////////////////////////////////////////////////////////////////////// // CMsg diagnostics #ifdef _DEBUG void CMsg::AssertValid() const { CObject::AssertValid(); } void CMsg::Dump(CDumpContext& dc) const { CObject::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CMsg message handlers void CMsg::Init() { m_cmdID = CONTINUED; m_nCount = -1; m_bClose = FALSE; m_msgList.RemoveAll(); } void CMsg::Serialize( CArchive& ar ) { if( ar.IsStoring() ) { ar << m_cmdID; ar << m_nCount; ar << (WORD)m_bClose; } else { ar >> m_cmdID; ar >> m_nCount; WORD wd; ar >> wd; m_bClose = (BOOL)wd; } m_msgList.Serialize(ar); }